Air中新建窗口 Create New Window In Air

Categories: Flex; Tagged with: ; @ October 20th, 2008 17:16

问题:在Air中新建一个窗口

代码实现:

在app初始化时执行以下函数,将新建并添加一个名为"New Winidow Test",长宽分别为200的窗口:

private function init():void {
	newWindow = new Window();
	newWindow.width = 200;
	newWindow.height = 200;
	newWindow.title = "New Winidow Test";
	newWindow.systemChrome = "none";
	newWindow.type = NativeWindowType.UTILITY
	newWindow.open();
}

如果需要设定该窗口的显示位置, 可通过监听AIREvent.WINDOW_COMPLETE事件来进行x,y的设定.

<->



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.